import request, { download } from '@/utils/request'
// 下载
/**
 * 
 * @param {*} data //入参
 * @param {*} filename //下载文件名称以及文件后缀为文件类型
 * @returns 
 */
export function downloadexport (data, filename) {
  return download(
    '/function/check/stock/consumable/export',
    data,
    filename
  )
}
// 库存盘点列表
export function getSelectstockList (query) {
  return request({
    url: '/function/check/stock/list',
    method: 'get',
    params: query
  })
}
// 库存盘点详情
export function getSelectstockChildren (query) {
  return request({
    url: '/function/check/stock/' + query,
    method: 'get'
  })
}
// 库存盘点物料列表
export function getSelectstockConsumableList (query) {
  return request({
    url: '/function/check/stock/consumable/list',
    method: 'get',
    params: query
  })
}
// 仓库列表（全名）
export function getSelectfullNameList (query) {
  return request({
    url: '/function/storehouse/fullName/list',
    method: 'get',
    params: query
  })
}
// 新增盘点
export function postCreatedstock (data) {
  return request({
    url: '/function/check/stock',
    method: 'post',
    data
  })
}
// 备件耗材基值列表
export function getSelectConsumablecheckList (query) {
  return request({
    url: '/function/storehouse/consumable/check/list',
    method: 'get',
    params: query
  })
}
// 开始盘点
export function putStart (data) {
  return request({
    url: '/function/check/stock/start',
    method: 'put',
    data
  })
}
// 完成盘点
export function putConsumable (data) {
  return request({
    url: '/function/check/stock/consumable',
    method: 'put',
    data
  })
}
// 结束盘点
export function putend (data) {
  return request({
    url: '/function/check/stock/end',
    method: 'put',
    data
  })
}
// 平账
export function putaccount (data) {
  return request({
    url: '/function/check/stock/account',
    method: 'put',
    data
  })
}